<?php

namespace IDock\Insurance\ZMBX\Response;

use IDock\Http\Response;
use IDock\IDock\IDockEnums;
use IDock\Insurance\ZMBX\ZMBXEnums;
use IDock\Insurance\ZMBX\Response\AllZMBXResponse;
use IDock\Printer\Premium\PremiumCoveragePrinter;
use IDock\Printer\Premium\PremiumRelationPrinter;
use IDock\Printer\RenewalInquiryPrinter;
use IDock\Printer\VehiclePrinter;

class RenewalInquiryResponse extends AllZMBXResponse
{
    public function printerInit(): Response
    {
        $renewalInquiryPrinter = new RenewalInquiryPrinter();

        $data = $this->getBody();
        $renewalFlag = $data['renewalFlag'] ?? '';
        if ($renewalFlag) {
            $renewalInquiryPrinter->setRenewalFlg(true);
        } else {
            $this->printer = $renewalInquiryPrinter;
            return $this;
        }
        $this->printer = $renewalInquiryPrinter;

        return $this;
    }
}
